package com.lyh.system.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyh.system.domain.Income;
import com.lyh.system.domain.OperationInfo;
import com.lyh.system.domain.req.OPerPageReq;
import com.lyh.system.domain.vo.Income2Vo;
import com.lyh.system.domain.vo.SevenIncomeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 收支明细Mapper接口
 *
 * @author ruoyi
 * @date 2023-05-11
 */
@Mapper
public interface OperationInfoMapper extends BaseMapper<OperationInfo> {
    /**
     * 查询收支明细
     *
     * @param id 收支明细主键
     * @return 收支明细
     */
    public OperationInfo selectOperationInfoById(Long id);

    /**
     * 查询收支明细列表
     *
     * @param operationInfo 收支明细
     * @return 收支明细集合
     */
    public List<OperationInfo> selectOperationInfoList(OperationInfo operationInfo);

    /**
     * 新增收支明细
     *
     * @param operationInfo 收支明细
     * @return 结果
     */
    public int insertOperationInfo(OperationInfo operationInfo);

    /**
     * 修改收支明细
     *
     * @param operationInfo 收支明细
     * @return 结果
     */
    public int updateOperationInfo(OperationInfo operationInfo);

    /**
     * 删除收支明细
     *
     * @param id 收支明细主键
     * @return 结果
     */
    public int deleteOperationInfoById(Long id);

    /**
     * 批量删除收支明细
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOperationInfoByIds(Long[] ids);

    String sevenList(@Param("date") String date, @Param("userId") Long userId);

    List<Income2Vo> getDynamicIncome(@Param("userId") Long userId);

    List<Income2Vo> getStaticIncome(@Param("userId") Long userId);

    List<OperationInfo> operationInfoList(@Param("userId") Long userId, @Param("type") String type, @Param("origin") String origin);

    List<OperationInfo> operationInfoPage(@Param("req") OPerPageReq req);

}
